﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp3
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int[] arr = new int[10] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
            string arrStr = "";

            Console.WriteLine("arr[2]=" + arr[2]);
            Console.WriteLine("arr[9]=" + arr[9]);

            Console.WriteLine("arr.Length=" + arr.Length);

            for (int i = 0; i < arr.Length; i++)
            {
                arrStr += arr[i];
                if(i < arr.Length -1)
                {
                    arrStr += " ";
                }
            }
            Console.WriteLine(arrStr);

            foreach(int i in arr)
            {
                Console.WriteLine(i);
            }

            string[] animals = new string[] { "子鼠", "丑牛", "寅虎", "卯兔", "辰龙", "巳蛇", "午马", "未羊", "申猴", "酉鸡", "戌狗", "亥猪" };
            string animalStr = "";

            for (int i = 0; i < animals.Length; i++)
            {
                animalStr += animals[i];
                if (i < animals.Length - 1)
                {
                    animalStr += "|";
                }
            }
            Console.WriteLine(animalStr);

        }
    }
}
